/******************************************************************************
** 
** "Any" program (chapter 2 exercise 2.5).
** 
** File name:	any.c
** Compilation:	cc any.c -o any
** Execution:	./any
** 
** Description:
** Get two strings. Returns the number of the position of first character 
** found in s1 that is also present in s2. If no match - returns -1.
** 
******************************************************************************/
#include <stdio.h>
#include <limits.h>
#include "myfunctions.h"

#define STRING_MAX_LENGTH UCHAR_MAX

int main()
{
    char s1[STRING_MAX_LENGTH];
    char s2[STRING_MAX_LENGTH];
    unsigned short int length;

    if ( (length = GetString(s1, STRING_MAX_LENGTH)) && (length = GetString(s2, STRING_MAX_LENGTH)) ) {
        printf("\n%d\n", FirstMatchPosition(s1, s2));
    }

    return 0;
}

